package bman.tools;

import java.io.PrintWriter;
import java.io.StringWriter;

public class JException
{
	/**
	 * Convenience method that extracts the stack trace from an exception.
	 * 
	 * @return Returns the exception's stack trace.
	 */
	public static String printStackTrace(Exception e)
	{
		StringWriter sw = new StringWriter();
		PrintWriter pw = new PrintWriter(sw);
		e.printStackTrace(pw);
		return sw.toString();
	}
}
